export function setCache(key, value){
  localStorage.setItem(key, JSON.stringify(value))
}

export function getCache(key){
  const val = localStorage.getItem(key)
  if (val) return JSON.parse(val)
  else return ''
}

export function removeCache(key) {
  localStorage.removeItem(key)
}

export function clearCache() {
  localStorage.clear()
}